package com.lanou3g.code0509;

import javax.servlet.*;
import java.io.IOException;

/**
 * If there are no bugs, it was created by Chen FengYao on 2018/5/9;
 * Otherwise, I don't know who created it either
 */

public class BServlet implements Servlet {
    /*
    Servlet 是线程不安全的
    等级一: 不在Servlet中创建全局变量
    等级二: 在Servlet中创建无状态全局变量(没有属性的对象)
    等级三: 创建有状态的全局变量,但是状态都是只读的
    */
    private ServletConfig servletConfig;
    @Override
    public void init(ServletConfig servletConfig) throws ServletException {
        this.servletConfig = servletConfig;
    }
    @Override
    public ServletConfig getServletConfig() {
        return servletConfig;
    }

    @Override
    public void service(ServletRequest servletRequest, ServletResponse servletResponse) throws ServletException, IOException {

    }

    @Override
    public String getServletInfo() {
        return null;
    }

    @Override
    public void destroy() {

    }
}
